<template>
  <div class="app">
    <BaseSelect v-model="selectId"></BaseSelect>

    <!-- <BaseSelect :cityId="selectId" @change="handleChange"></BaseSelect> -->
    <!-- <BaseSelect :value="selectId" @input="handleChange"></BaseSelect> -->

    <!-- 想要让组件支持 v-model，必须组件内部定义了 value 属性 和 触发了 input 自定义事件 -->
    <BaseSelect v-model="selectId"></BaseSelect>
    
    <BaseSelect v-model="selectId"></BaseSelect>

  </div>
</template>

<script>
import BaseSelect from './components/BaseSelect.vue'
export default {
  data() {
    return {
      selectId: '102',
    }
  },
  components: {
    BaseSelect,
  },
  methods: {
    handleChange(e) {
      console.log(e);
      this.selectId = e
    }
    
  }
}
</script>

<style>
</style>